<?php
require('includes/top.php');

if($_POST['cat'])//query 4 only category selected 
{
$category=$_POST['cat'];
$ans=mysql_query("select * from vendors where vendor_category_id='".$category."'");

?>
<table width="50%">
<tr>
<td>
	<table border='0' align="center">
		<tr>
			<th align="left">Vendors</th>
		</tr>
			<?php		
			while($res=mysql_fetch_array($ans))
			{
			?>
		<tr>
			<td><a href="#"><?php echo $res['company_name']; ?></a><br/><?php echo $res['company_info']; ?></td>
		</tr>
			<?php
			}
			?>
	</table>
</td>

<td valign="top" align="right">
	<table>
		<tr>
			<th align="left">Featured Experts</th>
		</tr>
		<?php 
			$f_experts=mysql_query("select * from experts where expert_cat_id='3'");
			while($f_rows=mysql_fetch_array($f_experts))
			{ 
		?>
		<tr><td><a href="#"><?php echo $f_rows['company_name']; ?></a></td></tr>
		<?php
			}
		 ?>
	</table>
</td>

</tr>
</table>
<?php
}
?>
